fix tidy performance-unnecessary-copy-initialization
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 20 Nov 2022 15:16:37 +0000 (08:16 -0700)
committertsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 20 Nov 2022 15:16:37 +0000 (08:16 -0700)
manual fix.  also fixes an instance of modernize-loop-convert

gui/mainwindow.cc

index ac0643bdef5912ea86792fd460ae3fe6beb8f3e2..78b632b980792203cd6fbc9862c7736b54359a9c 100644 (file)
@@ -117,8 +117,7 @@ bool MainWindow::allowBetaUpgrades()
 static QString MakeOptions(const QList<FormatOption>& options)
 {
   QString str;
-  for (int i = 0; i< options.size(); i++) {
-    FormatOption option = options[i];
+  for (const auto& option : options) {
     QVariant default_value = option.getDefaultValue();
     if (option.getSelected()) {
       // For OPTbool, 'selected' is the key, not value.